package StudyCode.summary.myfile;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Map;
import java.util.Set;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class GetMapOfFileAttributes {
	public static void main(String[] args) throws Exception {
		Path path = Paths.get("E:\\迅雷下载\\test1.txt");

		Map<String, Object> attrsMap = Files.readAttributes(path, "*");
		Set<String> keys = attrsMap.keySet();

		for (String attribute : keys) {
			System.out.println(attribute + ": " + Files.getAttribute(path, attribute));
		}
	}

}
